<template>
	<view class="my-delivery">
		<x-skeleton type="list" :loading="loading">
			<view class="common-list" v-if="postList.length">
				<view class="common-item" v-for="item in postList" :key="item.id"
					@click="nologinJump(`/subpage/talentemployment/employment/postinfo?id=${item.id}&careerId=${queryParams.careerId}&type=${type}`)">
					<!-- <view class="common-head">
						<text class="status-text">2025年3月10日 12:32｜您的简历已被查阅</text>
					</view> -->
					<view class="common-name">
						<text class="name-text">{{ item.stationName }}</text>
						<text class="text-color" v-if="item.salaryRange !== '面议'">{{ item.salaryRange }}元</text>
						<text class="text-color" v-else>面议</text>
					</view>
					<view class="common-label">
						<text>{{ item.stationEdu }}</text>
						<text>{{ item.stationLesson }}</text>
						<text>招{{ item.recruitsNumber }}人</text>
					</view>
					<view class="common-footer">
						<text class="foot-text">{{ item.companyInfo.compName }}</text>
						<text class="foot-address">{{ item.stationAddr }}</text>
					</view>
					<view class="common-bottom">
						投递时间 {{ item.createTime }}
					</view>
				</view>
			</view>
			<view v-else class="no-data">
				<text>暂无数据</text>
			</view>
		</x-skeleton>
	</view>
</template>

<script>
	import { myDelivery } from '@/common/api_employment.js'
	export default {
		components: {
		},
		data() {
			return {
				loading: true,
				postList: [],
				
			}
		},
		onLoad(option) {
			this.getPostList()
		},
		
		methods: {
			async getPostList() {
				const postData = await myDelivery()
				this.postList = postData.data
				this.loading = false
			},
		}
	}
</script>


<style lang="scss" scoped>
	.my-delivery {
		min-height: 100vh;
		padding: 24rpx 0 0;
		background: #F2F5FF;
		box-sizing: border-box;
	}
	.common-list {
		padding: 0 32rpx;
		box-sizing: border-box;

		.common-item {
			width: 100%;
			padding: 24rpx 32rpx 16rpx;
			margin-bottom: 24rpx;
			box-sizing: border-box;
			background: #FFFFFF;
			border-radius: 40rpx;
			
			.common-head {
				text-align: right;
				padding-bottom: 16rpx;
				border-bottom: 1px solid #F3F3F3;
				.status-text {
					
					font-weight: 400;
					font-size: 22rpx;
					color: #0066FD;
					line-height: 16px;
					
				}
			}
			
			

			.common-name {
				display: flex;
				margin-bottom: 20rpx;
				justify-content: space-between;
				padding-top: 24rpx;

				.name-text {
					font-weight: 600;
					font-size: 32rpx;
					color: #34314F;
					line-height: 22px;
				}

				.text-color {
					font-weight: 500;
					font-size: 32rpx;
					color: #FF7F1C;
					line-height: 22px;
				}
			}

			.common-label {
				display: flex;
				flex-wrap: nowrap;
				margin-bottom: 24rpx;

				text {
					display: block;
					margin-right: 16rpx;
					padding: 4rpx 12rpx;
					font-size: 24rpx;
					color: #34314F;
					line-height: 32rpx;
					border-radius: 8rpx;
					background-color: #F4F4F4;
					box-sizing: border-box;
				}
			}

			.common-footer {
				display: flex;
				flex-wrap: nowrap;
				padding-bottom: 42rpx;
				justify-content: space-between;

				.foot-text {
					font-weight: 400;
					font-size: 26rpx;
					color: rgba(52, 49, 79, 0.7);
					line-height: 32rpx;
				}

				.foot-address {
					font-weight: 400;
					font-size: 26rpx;
					color: rgba(52, 49, 79, 0.5);
					line-height: 32rpx;
				}
			}
			
			.common-bottom {
				padding-top: 16rpx;
				font-weight: 400;
				font-size: 22rpx;
				color: rgba(52,49,79,0.6);
				line-height: 16px;
				text-align: right;
				border-top: 1px solid #F3F3F3;
			}
		}
	}
</style>